#
# Makefile for OpenMP versions of Matrix-mult-block program
#
# "make" or "make all" to make all executables
# "make clean" to remove executables
#

OPT 				= -O3
CFLAGS      = $(OPT) -Wall -pedantic -fopenmp -std=c99
OMPC        = gcc
OPENACC     = /home/ivan/phd/yacf-openacc/bin/buildAcc.sh
YACF_CFLAGS := ${CFLAGS}
export ${YACF_CFLAGS}

all : matrix-mult-seq-block matrix-mult-par-block matrix-mult-acc-block

clean : 
	-rm -rf matrix-mult-par-block mult-seq-block
	-rm -rf *.o
	-rm -rf *~

matrix-mult-seq-block: matrix-mult-seq-block.c matrix-mult-print.h matrix-mult-utility.h matrix-mult-initfortest.h
	$(OMPC) $(CFLAGS) -o mult-seq-block  matrix-mult-seq-block.c

matrix-mult-par-block: matrix-mult-par-block.c matrix-mult-print.h matrix-mult-utility.h matrix-mult-initfortest.h
	$(OMPC) $(CFLAGS) -o matrix-mult-par-block matrix-mult-par-block.c

matrix-mult-acc-block: matrix-mult-par-block.c 
	YACF_CFLAGS="${YACF_CFLAGS}" $(OPENACC)  matrix-mult-acc-block.c /home/ivan/phd/salida-llcomp/accMXM/
	cd /home/ivan/phd/salida-llcomp/accMXM/Frangollo; make

